The SimpleMenu Component > FSimpleMenu.getLength()

 

FSimpleMenu.getLength()

Availability

Flash Player 6.

Usage

sm_instance.getLength()

Parameters

None.

Returns

The number of items on the SimpleMenu.

Description

Retrieves the number of items on the SimpleMenu component (including separator bars).

Example

The following code removes items from the SimpleMenu until there are only four left:

for (i = sm.getLength(); i > 4; i--) {
    sm.removeItemAt(i);
}

See also

FSimpleMenu.addItem
FSimpleMenu.removeItemAt